-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: about-us add Carousel #21
Conversation
diff --git a/components/FlickrCarousel.vue b/components/FlickrCarousel.vue
index 6d7f83a..c658985 100644
--- a/components/FlickrCarousel.vue
+++ b/components/FlickrCarousel.vue
@@ -1,19 +1,11 @@
-<script>
+<script setup>
import { Swiper, SwiperSlide } from 'swiper/vue'
import 'swiper/swiper-bundle.css'
+import imageA from '#assets/images/1.jpg'
+import imageB from '#assets/images/2.jpg'
+import imageC from '#assets/images/3.jpg'
-export default {
- components: { Swiper, SwiperSlide },
- data() {
- return {
- images: [
- '/images/image1.jpg', // Replace with your image paths
- '/images/image2.jpg',
- '/images/image3.jpg',
- ],
- }
- },
-}
+const images = [imageA, imageB, imageC]
</script>
<template>
@@ -24,7 +16,7 @@ export default {
>
<SwiperSlide
v-for="(src, index) in images"
- :key="index"
+ :key="src"
>
<img
:alt="`Image ${index + 1}`" 這樣應該就可以動了!
|
components/FlickrCarousel.vue 我嘗試根據第 1、3 點修改,但不確定第 2 點的意思。😅 第 2 點意思是指需要手動將圖片的位置改放到 /assets 底下(也就是 |
放在 BTW,在開發時用 |
嗨!Bessy 這些圖片看起來好肥好大,建議可以先縮到適合的大小然後再壓過一遍 推薦一個線上工具https://squoosh.app |
考量到現在的圖片大小不到 300px 高(好像可以再大一些 ><)可以轉換成 100 kB 以下的 WebP 檔案,應該還是能保有很好的品質! |
我利用咪路提供的 https://squoosh.app/ 工具,將照片 Quality 調在 10 ~ 20 之間,約莫 200 kB 左右的 WebP 檔案。 |
接下來,我會嘗試將圖和文字弄在一起,類似 SITCON 支持我們 這樣。 |
c7489c6
to
a629a13
Compare
我把 commit 拆掉再重新 push 囉!感謝 Riley 建議~ 記錄一下作法: 切換到目標分支
$ git checkout [分支名稱]
檢視提交的歷史記錄
$ git log
拆掉倒數兩個 commit (保留更改,但刪除已提交的歷史記錄),亦即透過 git reset 返回原本倒數第三個 commit 的狀態
$ git reset --soft HEAD~2
將第二個和第三個 commit 的變動合併為一個新的 commit
$ git commit --amend
強制更新遠端分支
$ git push --force |
還有另外一種可能更方便的做法,就是用 interactive rebase ( |
好了記得要打開 pr 喔! |
好的,我下次用這方式試試看,謝謝! |
我先把這版發 PR |
Carousel 待修